/**
 * Created by Administrator on 2017/9/1.
 */
var React = require('react');

module.exports = React.createClass({
    getInitialState: function () {
        return {

        }
    },

    jroll : null,

    componentDidMount() {
        var wrappers = this.props.ID || 'wrappers';
        this.jroll = new JRoll("'#"+wrappers+"'");
        this.jroll.refresh();
    },
    componentDidUpdate() {
        this.jroll.refresh();
    },
    render() {
        var height = this.props.height;
        return (
            <div id={this.props.ID ? this.props.ID : 'wrappers'} style={{height: height ? height : "100%"}}>
                <ul id="scroller">
                    {this.props.children}
                </ul>
            </div>
        )
    }
});